<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base href="{$Think.const.BASE_PATH}">
    <title>最新影片下载=高清影片下载-迅雷下载</title>
    <!--引入头部meta文件 -->
    {include file="index/head_meta" /}
    <!--引入头部link(css)文件 -->
    {include file="index/head_link" /}
    <!--引入头部script文件 -->
    {include file="index/head_script" /}

    <!--右侧排行推荐-->
    <link href="public/static/plugs/paihang/css/paihang.css?v={$Think.const.NOW_TIME}" type="text/css" rel="stylesheet" />
    <!--页面内部样式-->
    <link href="public/static/css/index/index/index.css?v={$Think.const.NOW_TIME}" type="text/css" rel="stylesheet" />
</head>
<body>
    <!--引入头部html文件 -->
    {include file="index/head"/}

    <!--主页数据显示-->
    <div class="container" >
        {if condition="$Think.session.uid.userName=='' or $Think.session.uid.userName==null"}
        <div class="row">
            <marquee onmouseover=this.stop() onmouseout=this.start() style="width: 100%;" >{$Think.config.advertisement}</marquee>
        </div>
        {/if}
        <div class="row">
            <div class="col-sm-8" >
                {volist name="filmTuijian" id="list"}
                    {if condition="count($list)>0"}
                        <div class="mox">
                            <h5>最新{$list[0]['cataLogName']}推荐<span style="margin-right:10px;cursor:pointer;float: right;" onclick="location.href='{:url(\'xl/index\',\'cataLog_id=\'.$list[0][\'cataLog_id\'])}'">更多>></span></h5>
                            <ul>
                                {volist name="list" id="li"}
                                <li class="float-left">
                                    <a href="{:url('xl/detail','film_id='.$li.id)}">
                                        <div class="t_img" title="{$li.name}">
                                            <img class="lazy rounded img-fluid"  data-original="{$li.image}"/>
                                        </div>
                                    </a>
                                    <div class="t_info">
                                        <p style="color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{$li.name}</p>
                                        <p>{$li.typeName}-{$li.onDecade}</p>
                                    </div>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    {/if}
                {/volist}
            </div>
            <div class="col-sm-4">
                {volist name="filmPaiHang" id="list"}
                    {if condition="count($list)>0"}
                        <div class="case">
                            <ul>
                                <h5>最新{$list[0]['cataLogName']}排行榜</h5>
                                {volist name="list" id="li" key="s"}
                                <li>
                                    {if condition="$s<=3"}
                                        <span class="ph1">{$s}</span>
                                    {/if}

                                    {if condition="$s>3"}
                                        <span class="ph">{$s}</span>
                                    {/if}
                                    <a href="{:url('xl/detail','film_id='.$li.id)}" target="_blank" title="{$li.name}">
                                        {$li.name|mb_substr=0,16}
                                        <span style="float: right;margin-right: 10px;">
                                            {$li.updateTime|substr=5,11}
                                        </span>
                                    </a>

                                    <div class="tips">
                                        <div class="tipscont">
                                            <img src="{$li.image}" style="border:1px solid #ddd;padding: 4px;background: white;" width="200px" height="288px" alt="{$li.name}"/>
                                        </div>
                                    </div>
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    {/if}
                {/volist}
            </div>
        </div>
    </div>
    <!--引入底部html文件 -->
    {include file="index/footer" /}

    <script type="text/javascript">
        function updateFilmSize() {
            var w = $(".col-sm-8").width() / 6;
            var isLi = false;
            if ($(".col-sm-8").width() < 500) {
                w = $(".col-sm-8").width() / 3;
                isLi = true;
            }
            w = parseInt(w - 0.5);
            $(".mox ul li").css("width", w + "px");
            var h = (w * 160) / 115;
            $(".t_img").css("height", h + "px");
            if(isLi){
                $(".case").css("height", "auto");

            }else {
                $(".case").each(function (index,ele) {
                    $(ele).css("height", ($(".mox").eq(index).height()) + "px");
                });
                $(".case").css({"overflow":"hidden"});
            }
        }

        $(document).ready(function(){
            $(".case ul li a").each(function(i){
                $(this).hover(function(){
                    $(this).parent().find(".tips").addClass("hover");
                    $(this).parent().addClass("lihover");
                },function(){
                    $(this).parent().find(".tips").removeClass("hover");
                    $(this).parent().removeClass("lihover");
                });
            });
            updateFilmSize();
            $(window).resize(function(){
                updateFilmSize();
            });
        });
    </script>
</body>
</html>